
from libs.exception import BaseHTTPException
from flask_babel import gettext as _

class HTTPTimbreNotExistError(BaseHTTPException):
    error_code = "timbre_not_exist"
    description = "Timbre not exist.{timbre_id}"
    code = 400
    def __init__(self,timbre_id:str|None):
        if timbre_id:
            self.description = _("Timbre not exist.{timbre_id}").format(timbre_id=timbre_id)
        else:
            self.description = _("Timbre not exist.")
        super().__init__(description=self.description)
